<?php

namespace api\goods\controller;

class AdminCompensationController extends \Aaa\goods\controller\AdminCompensationController {

    protected function init() {
        $this->baseField = [
            [
                'field' => 'id',
                'name' => 'ID',
            ],
            [
                'field' => 'name',
                'name' => '名称',
            ],
            [
                'field' => 'type',
                'name' => '类型',
                'type' => 'radio',
                'options' => [
                    ['name' => '金额百分比', 'value' => 'pct'],
                    ['name' => '固定手续费', 'value' => 'fixed'],
                ],
            ],
            [
                'field' => 'remark',
                'name' => '说明',
            ],
            [
                'field' => 'amount',
                'name' => '费率',
            ],
            [
                'field' => 'label',
                'name' => '标签名称',
            ],
            [
                'field' => 'label_color',
                'name' => '标签颜色',
                'type' => 'color',
            ],
            [
                'field' => 'label_background_color',
                'name' => '标签背景色',
                'type' => 'color',
            ],
            [
                'field' => 'list_order',
                'name' => '排序',
            ],
        ];
    }

    protected function beforeIndex() {
        //$this->actionField = ['id', 'name', 'label', 'label_color', 'label_background_color', 'expiration', 'list_order',];
    }

    protected function beforeAdd() {
        //$this->actionField = ['name', 'label', 'label_color', 'label_background_color', 'expiration', 'list_order',];
    }

    protected function beforeEdit() {
        $this->beforeAdd();
    }


}